
public class Student {
   public String name;
   public int age;
   public Student(){

       this("wangwu",28);
       System.out.println("这是一个无参的构造方法");
   }
   public Student(String name,int age){
       System.out.println("这是一个带两个参数的构造方法");
       this.name = name;
       this.age = age;
   }

   public void printStu(){
       System.out.println(this.name+" "+this.age);
   }

    public static void main(String[] args) {
        Student stu = new Student();
        stu.printStu();
        Student stu2 = new Student("lisi",18);
        stu2.printStu();

    }
}
